<div class="my_meta_control">
	<?php $anypost = wp_get_content('any'); ?>
	<?php 
		$anypost['-2'] = 'Select this to add external link';
	?>
	<p>Choose data to link into this gallery, you can choose <em>"Select this to add external link"</em> to add external link</p>
	<?php $mb->the_field('select_post'); ?>
	<select name="<?php $mb->the_name(); ?>" id="choose_link">
		<?php foreach($anypost as $key=>$val){ ?>
				<option value="<?php echo $key;?>"<?php $mb->the_select_state($key); ?>><?php echo $val;?></option>
		<?php } ?>
	</select>
	<?php //$select = $metabox->get_the_value();echo $select; ?>
	<?php $mb->the_field('external_link'); ?>
	<div id="external_link_container">
		<p>Add External Link</p>
		<input type="text" name="<?php $mb->the_name(); ?>" value="<?php $mb->the_value(); ?>" id="external_link"/>
	</div>
	<?php //$external_link = $metabox->get_the_value();echo $external_link; ?>
</div>
<script>
jQuery(document).ready(function(){
	jQuery('#external_link_container').hide();
	jQuery('#choose_link').change(function(){
		var $choose_link = jQuery(this).val();
		if( $choose_link == '-2'){
			jQuery('#external_link_container').show();
		}else{
			jQuery('#external_link_container').hide();
			jQuery('#external_link').val('');
		}
	});
	if( jQuery('#choose_link').val() == '-2' ){
		jQuery('#external_link_container').show();
	}
   // Your code here
});
</script>